<!-- 网站信息 -->
<template>
    <div class="website-information">
        <el-form ref="formRef" class="ls-form" :model="formData" label-width="120px">
            <el-card shadow="never" class="!border-none">
                <div class="text-xl font-medium mb-[20px]">百度统计</div>
                <el-form-item label="百度统计代码" prop="name">
                    <div class="w-80">
                        <el-input
                            v-model.trim="formData.value"
                            placeholder="请输入百度统计代码"
                            :rows="10"
                            type="textarea"
                            clearable
                        />
                    </div>
                </el-form-item>
            </el-card>
        </el-form>
        <footer-btns>
            <el-button type="primary" @click="handleSubmit">保存</el-button>
        </footer-btns>
    </div>
</template>
<script lang="ts" setup>
import { getStatis, setStatis, } from '@/api/application/website/link'
const formData = ref({
    value:""
})
const getLists = async()=>{
    const results = await getStatis({})
    if(results.length != 0){
        formData.value = results
    }
}
const handleSubmit= async()=>{
    await setStatis(formData.value)
}
getLists()
</script>